<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-touch-fullscreen" content="yes"/>
    <meta name="format-detection" content="telephone=no"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="format-detection" content="telephone=no"/>
    <meta name="msapplication-tap-highlight" content="no"/>
    <meta name="viewport" content="initial-scale=1,maximum-scale=1,minimum-scale=1"/>
    <title>账户余额</title>
    <link rel="stylesheet" type="text/css" href="/wap/e_tpl/css/base.css">
    <link rel="stylesheet" type="text/css" href="/wap/e_tpl/css/nctouch_member.css">
    <link rel="stylesheet" type="text/css" href="/wap/css/font-awesome.min.css">
</head>
<body>
<header id="header" class="fixed">
    <style>
        header{
            max-width: none !important;
            position: fixed;
            top: 0;
            width: 100%;
            z-index: 100;
            height: 60px !important;
        }
        .header-wrap{position: relative;z-index: 8888;height: 50px;
            margin-top: 0;
            width: 100%;
            min-width:0;
            max-width: 10000px;
        }
        .header-back{position: absolute;top: 8px;left: 6px;width: 1rem;height: 1rem;
            text-align: left;}
        .header-back span{width: 38px;height: 38px;text-indent:-9999px;background-position: -76px 2px;}
        .header-wrap h2{height: 2rem;line-height: 2rem;font-size: 16px;color: #fff;text-align: center;
            font-weight: bold;}
        .i-main-opera{position: absolute;top: 8px;right: 7px;width: 37px;height: 37px;}
        .i-main-opera span{width: 36px;height: 36px;background-position: 0px 0px;}
    </style>
    <style>
        #header{
            height: auto !important;
        }
        .header-wrap{
            height: auto !important;
            margin-top: 0 !important;
        }
    </style>
    <div class="header-wrap">
        <a href="javascript:history.back();" class="header-back">
            <i
               style="display:block;width: 80%; height: 80%;margin: 10%;background-image: url(/wap/e_tpl/images/arrow_left_b.png);background-position: 50% 50%;
    background-repeat: no-repeat;background-size: 100%;opacity: 0.75;"></i>
        </a>
        <h2 style="color:#000;font-weight:normal;font-size:0.9rem;">账户余额</h2>
        <a href="javascript:void(0)" id="header-nav" style="    background-image: url(/wap/e_tpl/images/more_b.png);
    background-repeat: no-repeat;
    background-position: 50% 50%;
    background-size: 100%;
    opacity: 0.65;    display: block;
    width: 0.95rem;
    height: 0.95rem;position:absolute;right:8px;top:8px;"></a>
    </div>

    <div class="nctouch-nav-layout">
        <div class="nctouch-nav-menu"><span class="arrow"></span>
            <ul>
                <li><a href="/wap"><i class="home"></i>首页</a></li>
                <li><a href="/wap/tmpl/search.php"><i class="search"></i>搜索</a></li>
                <li><a href="../product_first_categroy.php"><i class="categroy"></i>分类</a></li>
                <li><a href="../cart_list.php"><i class="cart"></i>购物车<sup></sup></a></li>
                <li><a href="../member/member.php"><i class="member"></i>我的商城</a></li>
            </ul>
        </div>
    </div>
</header>
<div class="nctouch-main-layout">
    <div id="pd_count" class="nctouch-asset-info"></div>
    <div id="fixed_nav" class="nctouch-single-nav">
        <ul id="filtrate_ul" class="w33h">
            <li class="selected"><a href="javascript:void(0);">账户余额</a></li>
            <li><a href="pdrecharge_list.php">充值明细</a></li>
            <li><a href="pdcashlist.php">余额提现</a></li>
        </ul>
    </div>
    <ul id="pointsloglist" class="nctouch-log-list">
    </ul>
</div>
<div class="fix-block-r">
    <a href="javascript:void(0);" class="gotop-btn gotop hide" id="goTopBtn"><i></i></a>
</div>
<footer id="footer" class="bottom"></footer>
<script type="text/html" id="pd_count_model">
    <div class="container pre">
        <i class="icon"></i>
        <dl>
            <dt>账户余额</dt>
            <dd>￥<em><%=predepoit;%></em></dd>
        </dl>
    </div>
</script>
<script type="text/html" id="list_model">
    <% if(list.length >0){%>
    <% for (var k in list) { var v = list[k]; %>
    <li>
        <div class="detail"><%=v.lg_desc;%></div>
        <% if(v.lg_av_amount >0){%>
        <div class="money add">+<%=v.lg_av_amount;%></div>
        <%}else{%>
        <div class="money reduce"><%=v.lg_av_amount;%></div>
        <%}%>
        <time class="date"><%=v.lg_add_time_text;%></time>
    </li>
    <%}%>
    <li class="loading">
        <div class="spinner"><i></i></div>
        数据读取中
    </li>
    <%}else {%>
    <div class="nctouch-norecord pdre">
        <div class="norecord-ico"><i></i></div>
        <dl>
            <dt>您尚无预存款收支信息</dt>
            <dd>使用商城预存款结算更方便</dd>
        </dl>
    </div>
    <%}%>
</script>
<script type="text/javascript" src="/wap/e_tpl/js/config.js"></script>
<script type="text/javascript" src="/wap/e_tpl/js/zepto.min.js"></script>
<script type="text/javascript" src="/wap/e_tpl/js/template.js"></script>
<script type="text/javascript" src="/wap/e_tpl/js/common.js"></script>
<script type="text/javascript" src="/wap/e_tpl/js/zepto.waypoints.js"></script>
<script type="text/javascript" src="/wap/e_tpl/js/ncscroll-load.js"></script>
<script>
    $(function () {
        var key = getCookie('key');
        if (!key) {
            window.location.href = WapSiteUrl + '/tmpl/member/login.html';
            return;
        }
        //渲染list
        var load_class = new ncScrollLoad();
        load_class.loadInit({
            'url': ApiUrl + '/index.php?act=member_fund&op=predepositlog',
            'getparam': {'key': key},
            'tmplid': 'list_model',
            'containerobj': $("#pointsloglist"),
            'iIntervalId': true
        });
        //获取预存款余额
        $.getJSON(ApiUrl + '/index.php?act=member_index&op=my_asset', {
            'key': key,
            'fields': 'predepoit'
        }, function (result) {
            var html = template.render('pd_count_model', result.datas);
            $("#pd_count").html(html);

            $('#fixed_nav').waypoint(function () {
                $('#fixed_nav').toggleClass('fixed');
            }, {
                offset: '50'
            });
        });
    });
</script>
</body>
</html>